/*=============================================================================
*
*   Copyright (C) 2020 All rights reserved.
*
*   Filename:		mod.rs
*
*   Author: Wang Zhecheng - wangzhecheng@yeah.net
*
*   Date: 2020-09-23 18:59
*
*   Last Editors: Wang Zhecheng - wangzhecheng@yeah.net
*
*   Last modified:	2020-11-04 12:35
*
*   Description:
*
=============================================================================*/
pub mod record;

pub trait HasName {
    fn type_name(&self) -> String;
    fn name() -> String
    where
        Self: Sized;
}

pub trait Indexable {
    fn get_index(&self) -> Option<usize>;
    fn set_index(&mut self, rhs: usize);
}

pub trait Hashable<T> {
    fn get_hashkey(&self) -> T;
    fn set_hashkey(&mut self, rhs: T);
    fn update_hashkey(&mut self);
}

pub trait ObserverLike {
    fn update(&mut self);
}
